package be.vdabantwerpen.gow.entities.actions;

import java.util.Date;

import com.google.appengine.repackaged.org.joda.time.DateTime;

import be.vdabantwerpen.gow.exceptions.InvalidActionPointsException;

public abstract class Action
{
	private int points;
	private DateTime dateTime;
	
	public Action(int points, DateTime dateTime)
	{
		setPoints(points);
		setDateTime(dateTime);
	}
	
	public void setPoints(int points)
	{
		if (points < 0)
		{
			throw new InvalidActionPointsException();
		} else
		{
			this.points = points;
		}
	}

	public int getPoints()
	{
		return points;
	}

	public DateTime getDateTime()
	{
		return dateTime;
	}

	private void setDateTime(DateTime dateTime)
	{
		this.dateTime = dateTime;
	}
}
